#include <iostream>
#include "Logger.h"

int main()
{
    Logger logger("log.txt");
    logger.log(LogLevel::INFO,"Starting application.");
    int user_id = 42;
    std::string action = "login";
    double duration = 3.5;
    std::string world = "World";

    logger.log(LogLevel::DEBUG,"User {} performed {} in {} seconds.", user_id, action, duration);
    // logger.log("Hello {}", world);
    // logger.log("This is a message without placeholders.");
    // logger.log("Multiple placeholders: {}, {}, {}.", 1, 2, 3);
    logger.log(LogLevel::INFO,"恭喜你，已入门!!!!");

    // 模拟一些延迟以确保后台线程处理完日志
    std::this_thread::sleep_for(std::chrono::seconds(1));

    // std::cout << "hello world!" << std::endl;
}